<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<import om.example.database.bean.model></import>
<html>
<head>
    <style type="text/css">
        body {
            background: url(背景9.jpg) no-repeat center center fixed;
            background-size: cover;

            font: 150%/1.6 Baskerville, Palatino, serif;
        }

        .description {
            position: relative;
            margin: 0 auto;
            box-shadow: 0 0 0 1px hsla(0, 0%, 100%, .3) inset,
            0 .5em 1em rgba(0, 0, 0, 0.6);

        }

        .description::before {
            content: '';
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            margin: -30px;
            z-index: -1;
            -webkit-filter: blur(20px);
            filter: blur(20px);
        }
    </style>
</head>
<body>
<from method="post" id="my">
    <p class="description">
        <script>
            function check() {
                var i,j=0;
                for(i=0;i<=4;i++) {
                    var checkbox = document.getElementById(i);
                    if (checkbox.checked == true) {
                        j=1;
                        var table = document.getElementById("tj");
                        window.alert(table.rows[i].cells[i].innerHTML);
                    }
                }
                if(j==0)
                    window.alert("请勾选");
            }
        </script>
    <dl>
        <dd><input type="submit" value="添加" onclick="check()"/></dd>
    </dl>
    <table id="tj" border="1" width="100%" style="text-align:center">
        <script type="text/javascript"><!--全选的方法 -->
        function selectAll() {
            var s = document.getElementsByName("like");
            for (var i = 0; i < s.length; i++) {
                s[i].checked = document.getElementsByName("all");
            }
        }
        </script>
        <tr>
            <td width="70" height="25"><input type="checkbox" name="all" id=0 value="全选" onclick="selectAll()"/>全选</td>
            <td width="70" height="25">id</td>
            <td width="70" height="25">名称</td>
            <td width="70" height="25">商品信息</td>
            <td width="70" height="25">批发商</td>
        </tr>
        <tr>
            <td><input type="checkbox" name="like" id=1 /></td>
            <td height="25">1</td>
            <td>1</td>
            <td>1</td>
            <td>1</td>
        </tr>
        <tr>
            <td><input type="checkbox" name="like" id=2 /></td>
            <td height="25">2</td>
            <td>2</td>
            <td>2</td>
            <td>2</td>
        </tr>
        <tr>
            <td><input type="checkbox" name="like" id=3 /></td>
            <td height="25">3</td>
            <td>3</td>
            <td>3</td>
            <td>3</td>
        </tr>
        <tr>
            <td><input type="checkbox" name="like" id=4 /></td>
            <td height="25">4</td>
            <td>4</td>
            <td>4</td>
            <td>4</td>
        </tr>
    </table>
    </p>
</from>
</body>
</html>
